<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Makefile</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Makefile) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;"># comment</span>

<span style="font-weight:bold;">include</span> Makefile.in
<span style="font-weight:bold;">-include</span> Makefile.doesntexist

<span style="color:#27ae60;font-weight:bold;">.PHONY:</span><span style="color:#2980b9;"> all</span>

<span style="color:#f67400;">all:</span><span style="color:#2980b9;"> target</span>

<span style="color:#2980b9;">foo </span><span style="color:#3daee9;">=</span><span style="color:#f44f4f;"> bar </span><span style="color:#3daee9;">$(</span><span style="color:#2980b9;">var</span><span style="color:#3daee9;">)</span><span style="color:#f44f4f;"> </span><span style="color:#3daee9;">\</span>
<span style="color:#f44f4f;">    </span><span style="color:#3daee9;">$(</span><span style="color:#2980b9;">baz</span><span style="color:#3daee9;">)</span><span style="color:#f44f4f;"> quux</span>

<span style="color:#fdbc4b;font-weight:bold;">ifeq</span> (<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">CC</span><span style="color:#3daee9;">)</span>,gcc)
    <span style="color:#2980b9;">bla</span><span style="color:#3daee9;">=$(</span><span style="font-weight:bold;">call</span><span style="color:#f44f4f;"> func</span><span style="font-weight:bold;">,</span><span style="color:#f44f4f;">param1</span><span style="font-weight:bold;">,</span><span style="color:#f44f4f;">param2</span><span style="color:#3daee9;">)</span>
<span style="color:#fdbc4b;font-weight:bold;">else</span> <span style="color:#fdbc4b;font-weight:bold;">ifeq</span> <span style="color:#f44f4f;">&quot;x&quot;</span> <span style="color:#f44f4f;">&quot;y&quot;</span>
    <span style="color:#3daee9;">$(</span><span style="font-weight:bold;">error</span><span style="color:#f44f4f;"> this seems wrong</span><span style="color:#3daee9;">)</span>
<span style="color:#fdbc4b;font-weight:bold;">else</span>
    <span style="color:#2980b9;">libs</span><span style="color:#3daee9;">=$(</span><span style="color:#2980b9;">normal_libs</span><span style="color:#3daee9;">)</span>
<span style="color:#fdbc4b;font-weight:bold;">endif</span>

<span style="color:#f67400;">target1:</span>
<span style="color:#da4453;text-decoration:underline;">        </span>error

<span style="color:#f67400;">target2:</span><span style="color:#2980b9;"> bla.cpp </span><span style="color:#3daee9;">$@</span>
	<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">CC</span><span style="color:#3daee9;">)</span> bla.c -o bla.o
	<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">CC</span><span style="color:#3daee9;">)</span> bla.o <span style="color:#3daee9;">$&lt;</span> <span style="color:#3daee9;">\</span>
	    <span style="color:#3daee9;">-</span><span style="color:#8e44ad;">o bla.exe</span>
	<span style="color:#3daee9;">@</span><span style="color:#8e44ad;">echo </span><span style="color:#f44f4f;">&quot;hello&quot;</span>

<span style="color:#7a7c7d;"># String Substitution</span>
<span style="color:#2980b9;">VAR </span><span style="color:#3daee9;">:=</span><span style="color:#f44f4f;"> </span><span style="color:#3daee9;">$(</span><span style="color:#2980b9;">ANOTHER_VAR</span><span style="font-weight:bold;">:</span><span style="color:#da4453;">%</span><span style="font-weight:bold;">=</span><span style="color:#da4453;">%+1</span><span style="color:#3daee9;">)</span>

<span style="color:#7a7c7d;"># Variable Assignment</span>
<span style="color:#2980b9;">RELAXED </span><span style="color:#3daee9;">::=</span><span style="color:#f44f4f;"> mello</span>
<span style="color:#2980b9;">rempl </span><span style="color:#3daee9;">:=</span><span style="color:#f44f4f;"> x</span>
<span style="color:#2980b9;">foo </span><span style="color:#3daee9;">:=</span><span style="color:#f44f4f;"> a b c</span>
<span style="color:#2980b9;">bar </span><span style="color:#3daee9;">:=</span><span style="color:#f44f4f;"> foo</span>
<span style="color:#2980b9;">hello </span><span style="color:#3daee9;">:=</span><span style="color:#f44f4f;"> </span><span style="color:#3daee9;">$($(</span><span style="color:#2980b9;">bar</span><span style="color:#3daee9;">)</span><span style="font-weight:bold;">:</span><span style="color:#da4453;">a</span><span style="font-weight:bold;">=</span><span style="color:#3daee9;">$(</span><span style="color:#2980b9;">rempl</span><span style="color:#3daee9;">))</span>

<span style="color:#7a7c7d;"># Conditionals</span>
<span style="color:#2980b9;">bar </span><span style="color:#3daee9;">=</span>
<span style="color:#2980b9;">foo </span><span style="color:#3daee9;">=</span><span style="color:#f44f4f;"> </span><span style="color:#3daee9;">$(</span><span style="color:#2980b9;">bar</span><span style="color:#3daee9;">)</span>
<span style="color:#fdbc4b;font-weight:bold;">ifdef</span> bar
<span style="color:#2980b9;">frobozz </span><span style="color:#3daee9;">=</span><span style="color:#f44f4f;"> yes</span>
<span style="color:#fdbc4b;font-weight:bold;">else</span> <span style="color:#fdbc4b;font-weight:bold;">ifdef</span> foo
<span style="color:#2980b9;">frobozz </span><span style="color:#3daee9;">=</span><span style="color:#f44f4f;"> no</span>
<span style="color:#fdbc4b;font-weight:bold;">endif</span>

<span style="color:#2980b9;">error_type </span><span style="color:#3daee9;">:=</span><span style="color:#f44f4f;"> 0</span>
<span style="color:#f67400;">check:</span>
<span style="color:#fdbc4b;font-weight:bold;">ifeq</span> (<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">error_type</span><span style="color:#3daee9;">)</span>,0)
<span style="color:#fdbc4b;font-weight:bold;">else</span> <span style="color:#fdbc4b;font-weight:bold;">ifeq</span> (<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">error_type</span><span style="color:#3daee9;">)</span>,1)
<span style="color:#fdbc4b;font-weight:bold;">else</span> <span style="color:#fdbc4b;font-weight:bold;">ifeq</span> (<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">error_type</span><span style="color:#3daee9;">)</span>,2)
<span style="color:#fdbc4b;font-weight:bold;">else</span> <span style="color:#fdbc4b;font-weight:bold;">ifeq</span> (<span style="color:#3daee9;">$(</span><span style="color:#2980b9;">error_type</span><span style="color:#3daee9;">)</span>,3)
<span style="color:#fdbc4b;font-weight:bold;">endif</span>
</pre></body></html>
